// Copyright 2012, Jun Chen .All rights reserved.
//
// Use of this source code is governed by a BSD-Style license that can be
// found in the License fule.
//
// Author: cpp.cheen at gmail dot com.



#define CONNECTOR_H

#include    "pch_files.h"
#include    <boost/function.hpp>

class   endpoint_ipv4class   evt_dispather;
class   connection;

class connector:public boost::noncopyable
{
    public:
    boost::function<void(connection&,endpoint_ipv4&)>       conn_functor;
    public:
        explicit    connector(evt_dispather& evt_loop,const endpoint_ipv4&   remote);
        virtual     ~connector();
    protected:
        void        on_connect(x_fd fd,endpoint_ipv4& peer);
        void        on_error(x_int32&   error_code);
    private:
};

#endif // CONNECTOR_H
